package com.example.sharding.util;

import com.example.sharding.service.ExampleService;

import java.sql.SQLException;

/**
 * Created by mazeyi on 2019/12/3.
 */
public class ExampleExecuteTemplate {

    public static void run(final ExampleService exampleService) throws SQLException {
        try {
            exampleService.initEnvironment();
            exampleService.processSuccess();
        } finally {
            exampleService.cleanEnvironment();
        }
    }
}